/*
* Copyright (C) 2012-2014 qar
* License: http://www.gnu.org/licenses/gpl.html GPL version 2
*/

#include "crypto/ciphers/encryptornull.h"

EncryptorNull::EncryptorNull()
{}

EncryptorNull::~EncryptorNull()
{}

qint64 EncryptorNull::blockSize() const
{
    return 1;
}

qint64 EncryptorNull::keySize() const
{
	return 1;
}

QString EncryptorNull::getAlgorithmName() const
{
    return "None";
}

void EncryptorNull::encrypt(const QByteArray &clearText, QByteArray &cipherText)
{
    cipherText = clearText;
}

void EncryptorNull::decrypt(const QByteArray &cipherText, QByteArray &clearText)
{
    clearText = cipherText;
}

bool EncryptorNull::toStream(QDataStream &)
{
    return true;
}

bool EncryptorNull::fromStream(QDataStream &) {
    return true;
}
